package com.xyrl.project.common.store.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.xyrl.project.common.base.entity.BaseEntity;
import java.util.Date;

import com.xyrl.project.common.util.RegexUtil;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import springfox.documentation.annotations.ApiIgnore;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;


/**
* @className StoreLegal.java
* @company 重庆星纭融链科技公司
* @author 徐恩源
* @version 1.0
* @date 2019-12-31 14:08:40
* @Description 商户企业法人实体类
*/
@Data
@TableName("t_store_legal")
@ApiModel(value="StoreLegal对象", description="商户企业法人")
public class StoreLegal extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "商户id")
    @NotNull(message = "商户id不能为空")
    private Long storeId;

    @ApiModelProperty(value = "法人身份证")
    @Pattern(regexp = RegexUtil.ID_CARD,message = "身份证号错误")
    private String idCard;

    @ApiModelProperty(value = "法人身份证有效期")
    @NotBlank(message = "法人身份证有效期不能为空")
    @Length(min = 1, max =50, message = "法人身份证有效期必须在{min}~{max}字符之间")
    private String validTime;

    @ApiModelProperty(value = "法人身份证签发单位")
    @NotBlank(message = "法人身份证签发单位不能为空")
    @Length(min = 1, max =50, message = "法人身份证签发单位必须在{min}~{max}字符之间")
    private String issuingUnit;

    @ApiModelProperty(value = "真实姓名")
    @NotBlank(message = "真实姓名不能为空")
    @Length(min = 1, max =20, message = "真实姓名必须在{min}~{max}字符之间")
    private String realName;

    @ApiModelProperty(value = "身份证国徽面附件id")
    private Long emblemAttId;

    @ApiModelProperty(value = "身份证头像面附件id")
    private Long headAttId;
    /**
     * 是否有效
     */
    @ApiModelProperty(value = "是否有效", hidden = true)
    private String enableFlag;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间", hidden = true)
    private Date createTime;


}
